{% extends 'project_python/layout_python.html' %}
{% load static %}

{% block python_content %}
<div class="card">
<form method="POST" class="layui-form">{% csrf_token %}
    <div class="card-header">
        <div class="row">
            <div class="col-md-1">
                <div style="width: 54px; height: 54px">
                    <svg fill="none" viewBox="0 0 64 64" class="insights-section__card-logo wt-display-md-none">
                        <defs>
                            <linearGradient id="__JETBRAINS_COM__LOGO_PREFIX__1" x1="7.671" x2="61.126" y1="64.393" y2="39.609" gradientUnits="userSpaceOnUse"><stop offset="0.1" stop-color="#00D886"></stop><stop offset="0.59" stop-color="#F0EB18"></stop></linearGradient>
                            <linearGradient id="__JETBRAINS_COM__LOGO_PREFIX__0" x1="59.933" x2="1.337" y1="59.676" y2="1.08" gradientUnits="userSpaceOnUse"><stop offset="0.3" stop-color="#F0EB18"></stop><stop offset="0.7" stop-color="#00C4F4"></stop></linearGradient>
                        </defs>
                        <path fill="#00D886" d="M6 47.55v12.259a4.125 4.125 0 0 0 4.19 4.124l11.044-.176a4.125 4.125 0 0 0 3.066-1.44l32.707-38.158c.64-.748.993-1.7.993-2.685V10.125A4.125 4.125 0 0 0 53.875 6H42.872c-1.19 0-2.321.514-3.105 1.409L7.021 44.834A4.123 4.123 0 0 0 6 47.55Z"></path>
                        <path fill="url(#__JETBRAINS_COM__LOGO_PREFIX__1)" d="M6 49.015v10.862a4.125 4.125 0 0 0 4.125 4.125h12.566c.2 0 .4-.014.598-.044l37.185-5.448A4.125 4.125 0 0 0 64 54.429V39.03a4.125 4.125 0 0 0-4.127-4.125l-18.504.005c-.426 0-.849.066-1.254.195l-31.244 9.98A4.126 4.126 0 0 0 6 49.015Z"></path>
                        <path fill="url(#__JETBRAINS_COM__LOGO_PREFIX__0)" d="M0 4.125v34.127c0 1.659.993 3.155 2.52 3.8L39.943 57.85c.518.219 1.075.33 1.638.324l18.329-.15A4.125 4.125 0 0 0 64 53.9V36.234c0-.806-.236-1.593-.678-2.267L42.213 1.86A4.125 4.125 0 0 0 38.766 0H4.125A4.125 4.125 0 0 0 0 4.125Z"></path>
                        <path fill="#000" d="M52 12H12v40h40V12Z"></path><path fill="#fff" d="M33 44H17v3h16v-3ZM16.993 16.992h6.442c1.057 0 1.984.193 2.78.579.798.386 1.412.929 1.845 1.63.432.7.648 1.51.648 2.432 0 .922-.22 1.759-.659 2.466-.44.708-1.063 1.256-1.87 1.646-.808.39-1.751.584-2.83.584h-3.43V32h-2.927V16.993Zm7.54 6.63c.369-.182.652-.443.852-.782.2-.34.3-.738.3-1.195s-.1-.842-.3-1.174c-.2-.333-.484-.59-.852-.772-.368-.182-.798-.273-1.291-.273h-3.324v4.47h3.324c.493 0 .923-.091 1.291-.273Zm9.18 7.62a7.287 7.287 0 0 1-2.744-2.786c-.664-1.183-.996-2.503-.996-3.961s.332-2.778.996-3.96a7.29 7.29 0 0 1 2.744-2.787c1.165-.675 2.466-1.014 3.902-1.014 1.215 0 2.33.225 3.344.675a6.862 6.862 0 0 1 2.535 1.892 6.443 6.443 0 0 1 1.356 2.793h-3.066a4.054 4.054 0 0 0-.895-1.431 4.038 4.038 0 0 0-1.43-.95 4.896 4.896 0 0 0-1.823-.332c-.887 0-1.687.222-2.402.665a4.611 4.611 0 0 0-1.677 1.827c-.404.776-.606 1.649-.606 2.62 0 .973.202 1.846.606 2.621a4.607 4.607 0 0 0 1.677 1.828c.715.443 1.515.664 2.402.664a4.88 4.88 0 0 0 1.822-.332 4.022 4.022 0 0 0 2.326-2.38h3.066a6.444 6.444 0 0 1-1.356 2.792 6.863 6.863 0 0 1-2.535 1.892c-1.015.45-2.129.675-3.344.675-1.436 0-2.737-.337-3.902-1.013v.003Z"></path>
                    </svg>
                </div>
            </div>
            <div class="col-md-11 layui-font-22 text-bold text-primary">{{ pycharm.DisplayName }}</div>
        </div>
    </div>
    <div class="card-body">
        <div class="alert alert-danger">
            注意：
            <div>将清除Pycharm <b>当前配置</b>，<b>安装的插件</b>，<b>缓存</b>，<b>本地历史记录</b>, <b>授权信息</b> 。</div>
            <div>专业版重置后可能需要重新授权。</div>
        </div>
        <div>
            {{ form.confirm_reset }}
            <div class="text-danger">{{ form.confirm_reset.errors }}</div>
        </div>
    </div>
    <div class="card-footer">
        <button type="submit" class="btn btn-danger">开始重置</button>
    </div>
</form>
</div>
{% endblock %}
